<?php
    session_start();

    error_reporting(E_ALL);
    ini_set("display_errors",1);
    ini_set("memory_limit","1024M");

    include('include/functions.inc');

    $usuarioSesion = null;
    if (isset($_SESSION['usuario']) && isset($_SESSION['password'])){
        $usuarioSesion = $_SESSION['usuario'];
        $passwordSesion = $_SESSION['password'];
    }else if (isset($_COOKIE['usuario']) && isset($_COOKIE['password'])){
        if (loginUser($_COOKIE['usuario'],$_COOKIE['password'])){
            $usuarioSesion = $_SESSION['usuario'] = $_COOKIE['usuario'];
            $passwordSesion = $_SESSION['password'] = $_COOKIE['password'];
        }
    }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
	<!-- La cabecera -->
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="generator" content="Bloc de notas" />
		<meta name="author" content="Rubén Pardo Millá" />
		<meta name="keywords" content="XHTML, web, images, album" />
		<meta name="description" content="Pagina web de gestión de albumes de fotos y compartirlas" />

        <link type="text/css" rel="stylesheet" href="css/stiloPrincipial.css" media="screen"/>
        <link type="text/css" rel="stylesheet" href="css/stileFixed.css" title="Fijo" media="screen"/>
        <link type="text/css" rel="alternate stylesheet" href="css/stileFluid.css" title="Fluido" media="screen"/>
        <link type="text/css" rel="stylesheet" href="css/stilePrint.css" media="print"/>

		<title>PI - Pictures &amp; Images</title>
	</head>